package com.ych.modules.base.dbEntity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Author: Usopp.tsui
 * Date: 2020/12/5
 * Time: 15:42
 * Description:
 */
@Data
@TableName("t_sys_menu")
@ApiModel(value = "TSysMenuEntity", description = "数据库-菜单表")
public class TSysMenuEntity extends AbstractPageEntity {
    @TableId("menu_id")
    @ApiModelProperty(value = "主键", dataType = "String", notes = "主键")
    private String menuId;

    @TableField("parent_id")
    @ApiModelProperty(value = "父菜单id，一级菜单为0", dataType = "String", notes = "父菜单id，一级菜单为0")
    private String parentId;

    @TableField("menu_name")
    @ApiModelProperty(value = "菜单名称", dataType = "String", notes = "菜单名称")
    private String menuName;

    @TableField("menu_url")
    @ApiModelProperty(value = "菜单URL", dataType = "String", notes = "菜单URL")
    private String menuUrl;

    @TableField("perms")
    @ApiModelProperty(value = "授权（多个用逗号分隔，如:user:list,user:create）", dataType = "String", notes = "授权（多个用逗号分隔，如:user:list,user:create）")
    private String perms;

    @TableField("menu_type")
    @ApiModelProperty(value = "类型 0：目录 1：菜单 2：按钮", dataType = "String", notes = "类型 0：目录 1：菜单 2：按钮")
    private String menuType;

    @TableField("icon")
    @ApiModelProperty(value = "菜单图标", dataType = "String", notes = "菜单图标")
    private String icon;

    @TableField("order_num")
    @ApiModelProperty(value = "排序", dataType = "Integer", notes = "排序")
    private Integer orderNum;

    @TableField("create_user_id")
    @ApiModelProperty(value = "创建用户id", dataType = "String", notes = "创建用户id")
    private String createUserId;

    @TableField("create_time")
    @ApiModelProperty(value = "创建时间", dataType = "Date", notes = "创建时间")
    private Date createTime;

    @TableField("infc")
    @ApiModelProperty(value = "接口类型 0：系统菜单 1：接口", dataType = "String", notes = "接口类型 0：系统菜单 1：接口")
    private String infc;

    @ApiModelProperty(value = "父菜单名称", dataType = "String", notes = "父菜单名称")
    @TableField(exist = false)
    private String parentName;


    @ApiModelProperty(value = "用于前端导航菜单处理封装", dataType = "List<?>", notes = "此参数无需传")
    @TableField(exist = false)
    private List<?> list = new ArrayList<>();
}
